cmake_minimum_required(VERSION 2.8.3)
project(tic_crow)
add_definitions(-std=c++11)

set(BOOSTROOT "/usr/local/include/boost")
set(BOOST_ROOT "/usr/local/include/boost")
include_directories(/usr/local/include)
link_directories(/usr/local/lib)

FIND_PACKAGE(Threads REQUIRED)
SET(Boost_USE_MULTITHREADED ON)
find_package(Boost REQUIRED COMPONENTS system)

find_package(PkgConfig)
pkg_check_modules(NEW_YAMLCPP yaml-cpp>=0.5)
if(NEW_YAMLCPP_FOUND)
add_definitions(-DHAVE_NEW_YAMLCPP)
endif(NEW_YAMLCPP_FOUND)

set(OpenCV_DIR "/opt/ros/kinetic/share/OpenCV-3.3.1-dev")
find_package(OpenCV REQUIRED)

find_package(catkin REQUIRED COMPONENTS
  message_generation
  roscpp
  tf
  nav_msgs
)

catkin_package(
  CATKIN_DEPENDS 
    message_runtime 
    roscpp  
    std_msgs
)


link_directories(
    /usr/lib/
    )

include_directories(
  include 
  yaml-cpp
  ${catkin_INCLUDE_DIRS}
)

aux_source_directory(./src DIR_SRCS)
aux_source_directory(./include/json11 DIR_SRCS)
aux_source_directory(./include/tic_crow DIR_SRCS)
add_executable(tic_crow
  src/main.cpp ${DIR_SRCS}
)

add_dependencies(tic_crow ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})

target_link_libraries(tic_crow 
     ${catkin_LIBRARIES}
      boost_thread boost_system
     ${CMAKE_THREAD_LIBS_INIT}
     ${catkin_LIBRARIES} yaml-cpp
    #  /home/lc/my_ws/src/tic_crow/include/libeasylogging.so
     ${OpenCV_LIBS}
     ${Boost_LIBRARIES}
)



      
